//
//  StructViewController.swift
//  mySwift
//
//  Created by X-MEN on 2021/12/10.
//

import UIKit

/**结构体*/
struct LGTeacher {
    var age = 10
    func teacher() {
        print("teacher")
    }
}

/**结构体*/
struct LGTeacher1 {
    var age: Int
    func teacher() {
        print("teacher")
    }
}

class StructViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        var t = LGTeacher()
        t.age = 20;
        var t1 = LGTeacher1(age: 10);


    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
